﻿@model EditorialProyectos.Website.Models.ProjectViewModel

<h2>Editar Proyecto</h2>

<div class="separator-small action-bar">
    @Action.Back()

    @SelectedAction.Delete()
</div>

<div class="row" data-bind="with: SelectedItem">
    @using (Html.BeginForm("Update", "Project", FormMethod.Post, new { id = "ProjectUpdate" }))
    {
        <div class="row">
            <div class="col-md-6">
                <div class="update">
                    @Html.Partial("FieldsPartial", Model)
                </div>
            </div>
        </div>
        <div class="separator-small"></div>
        <div class="row">
            <div class="col-md-12">
                <h2>Vista Previa</h2>
                <div class="form-group">
                    @TextEditor.Result("resultContainerUpdate")
                </div>

                @Html.LocalizedLabelFor(model => model.Entity.Html)
                @TextEditor.Editor("editorContainerUpdate", "TextEditorUpdate")
            </div>
        </div>

        <button data-bind="click: $root.Update" type="submit" class="btn btn-action btn-full-width">@Html.LocalizedAction("Update")</button>
    }
</div>
